#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

    string addStrings(string num1, string num2) {
        int len1 = num1.size();
        int len2 = num2.size();
        string num3;
        int next = 0;
        int number = 0;
        while (len1 || len2)
        {
            if (len1 > 0 && len2 > 0)
            {
                number = ((num1[len1-1] - '0') + (num2[len2-1] - '0'));
                number += next;
                next = number / 10;
                number %= 10;
                num3 += (char)number+'0';
                --len1;
                --len2;
            }
            else if (len1 == 0)
            {
                number = (num2[len2-1] - '0');
                number += next;
                next = number / 10;
                number %= 10;
                num3 += (char)number+'0';
                --len2;
            }
            else
            {
                number = (num1[len1-1] - '0');
                number += next;
                next = number / 10;
                number %= 10;
                num3 += (char)number+'0';
                --len1;
            }
        }
        if (next == 1)
        {
            num3 += '1';
        }
        reverse(num3.begin(), num3.end());
        return num3;
    }

int main()
{
    string num1 = "99";
    string num2 = "1";
    cout<<addStrings(num1, num2);
	return 0;
}